Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: PDF variation indices. #178

Open
wants to merge 7 commits into
base: 106X_HH_UL
Choose a base branch
from

Conversation

bfonta
Copy link

@bfonta bfonta commented Dec 6, 2024

I was using the wrong starting indices for some of the systematic variation schemes. The impact is very significant.
In particular, the MadGraph45B scheme is accessing vector elements that do not exist, which might explain the "outliers" that have been observed.

The bug comes from a confusion between "LHE weight id" and the actual vector index of the LHE weights, which are sometimes aligned, but can be wildly different.

Big ntuples will unfortunately have to be reproduced.

@portalesHEP
Copy link

Are all samples affected or could we do a partial production? If the former we might as well fic AK8 JECs before starting

@bfonta
Copy link
Author

bfonta commented Dec 6, 2024

Only samples associated to the three modified schemes are affected, but we are talking about many. I would fix any pending issue before proceeding with resubmission.

@dzuolo
Copy link

dzuolo commented Dec 6, 2024

I agree with Bruno.
Let's fix also the AK8 stuff before resubmitting.
And thanks for all your work :)

@bfonta bfonta force-pushed the bugfix/pdf_indices branch from b35cd49 to ce84927 Compare December 12, 2024 08:50
@bfonta
Copy link
Author

bfonta commented Dec 12, 2024

The latest commit fixes the issue reported here, which highlights a bug in the LHE weights of the ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-amcatnlo-pythia8 sample. The fix consists on multiplying all weights by two (2.), except the ones with indices 0 and 9.

@bfonta
Copy link
Author

bfonta commented Dec 12, 2024

Added parser to endRun to ensure the PDF ID of the PDF used as reference for QCD scale variations matches the PDF ID of the PDF used as reference for the PDF variations, as required by the GEN contact.
I would have ideally added the logic to beginRun, but that seems not to be supported by default, due to the following error message:

::getByToken: An attempt was made to read a Run product before endRun() was called.

The current solution is however acceptable, I believe.
I'm currently running tests on the single top samples.

@bfonta
Copy link
Author

bfonta commented Dec 20, 2024

The latest fix addresses this issue, where $\alpha_{\text{S}}$ variations are set to zero for the schemes when they are not available. I was previously considering a different PDF set (different PDF ID), which is not the recommended approach. Now the reference PDF for the QCD scale variations should always match the reference for the PDF variations (which makes intuitive sense); this is ensured by the logic in HTauTauNtuplizer::endRun(...).

I have tested locally a single sample for each scheme, but I cannot guarantee there is no corner case where this code fails.

Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants